package com.msxt.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.msxt.dto.ConfigEntity;
import com.msxt.mapper.ConfigDao;
import com.msxt.result.Query;
import com.msxt.service.ConfigService;
import com.msxt.utils.PageUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 系统配置服务实现类
 */
@Service("configService")
public class ConfigServiceImpl extends ServiceImpl<ConfigDao, ConfigEntity> implements ConfigService {

	@Override
	public PageUtils queryPage(Map<String, Object> params, QueryWrapper<ConfigEntity> wrapper) {
		Page<ConfigEntity> page = this.page(
				new Query<ConfigEntity>(params).getPage(),
				wrapper
		);
		return new PageUtils(page);
	}
}